<!DOCTYPE html>
<html lang="en">
<head>
    <base href="${request.contextPath}/"/>
    <meta charset="UTF-8">
    <title>登录</title>
    <script src="${request.contextPath}/js/jquery-1.11.1.min.js"></script>
    <link rel="stylesheet" href="${request.contextPath}/css/login.css">
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        .logo_name{
            position: absolute;
            top: 50px;
            left: 50px;
            width: 100%;
            z-index: 999;
            color: white;
            font-size: 35px;
            font-weight: 700;



        }

        #container {
            position: absolute;
            height: 100%;
            width: 100%;
        }

        #output {
            width: 100%;
            height: 100%;
        }

        .color {
            width: 120px;
            height: 20px;
            margin: 0 auto;
            position: fixed;
            left: 50%;
            margin-left: -60px;
            bottom: 20px;
        }

        .color li {
            float: left;
            margin: 0 5px;
            width: 20px;
            height: 20px;
            background: #ccc;
            box-shadow: 0 0 4px #FFF;
            list-style: none;
            cursor: pointer;
        }

        .color li:nth-child(1) {
            background: #002c4a;
        }

        .color li:nth-child(2) {
            background: #35ac03;
        }

        .color li:nth-child(3) {
            background: #ac0908;
        }

        .color li:nth-child(4) {
            background: #18bbff;
        }
    </style>
    <script src="${request.contextPath}/js/vector.js"></script>
    <script>
        $(function () {
            // 初始化 传入dom id
            var victor = new Victor("container", "output");
            var theme = [
                ["#002c4a", "#005584"],
                ["#35ac03", "#3f4303"],
                ["#ac0908", "#cd5726"],
                ["#18bbff", "#00486b"]
            ]
            $(".color li").each(function (index, val) {
                var color = theme[index];
                $(this).mouseover(function () {
                    victor(color).set();
                })
            });
        });
    </script>
    <#import "/spring.ftl" as spring>
    <style type="text/css">
        #container{
            position: relative;
        }
        .top_up{
            position: absolute;
            top:0;
            left: 0;
           height: auto;
            overflow: hidden;
            width: 100%;
        }
        .top_up .top_up_l{
             float: left;
         }
        .top_up .top_up_l p{
            float: left !important;
            font-size: 30px !important;
            color: #fff;
            padding: 20px 0 0 60px;
            font-weight: bold;

        }
        .top_up .top_up_r{
            float: right !important;
            margin-top: 20px;

        }
        .top_up .top_up_r a{
            float: left;
            display: block;
            padding: 5px 10px;
            border-radius: 5px;
            background-color: #1E9FFF !important;
            margin-right: 20px !important;
            font-size: 12px !important;
            color: #fff !important;
            text-decoration: none;
        }
        .top_up .top_up_r a:hover{
            background-color: #0B40A6 !important;
            transition: all 0.5s;
        }
    </style>
</head>
<body>
<!--<p class="logo_name">凌之迅农业大数据互联网平台</p>-->
<!--<p class="logo_name">农业大数据互联网平台</p>-->


<div id="container">
    <div class="top_up">
        <div class="top_up_l clearfix">
            <p ><@spring.message code="login.tip"/></p>
        </div>
        <div class="top_up_r" >
            <a href="${request.contextPath}/sy/login?locale=zh_CN" target="_self">中文</a>
            <a href="${request.contextPath}/sy/login?locale=en_US" target="_self">English</a>
        </div>

    </div>
    <div id="output">
        <div class="content_all">
            <div class="input_all">
                <form action="${request.contextPath}/sy/logindo" method="post">
                    <div class="input_ input_user">
                        <div class="img_img"><img src="${request.contextPath}/images/user.png" alt=""></div>
                        <input class="user_input" type="text" id="username" name="username" value="${username!''}">
                    </div>
                    <input  type="hidden" id="locale" name="locale" value="">

                    <div class="input_ input_password">
                        <div class="img_img"><img src="${request.contextPath}/images/password.png" alt=""></div>
                        <input class="password_input" type="password" id="password" name="password"
                               value="${password!''}">
                    </div>
                    <p>${info!''}</p>
                    <input class=" input_submit" type="submit" value="<@spring.message code='login.sign'/>">

                </form>

            </div>
        </div>
    </div>
</div>
</body>
<script>
    $(document).ready(function(){
        if(getQueryString("locale")!=null&&getQueryString("locale")!=''){
            $("#locale").val(getQueryString("locale"));
        }
    });
    function lanzh() {

        window.location.href = "${request.contextPath}/sy/login?locale=zh_CN";

    }
    function lanene() {
        window.location.href = "${request.contextPath}/sy/login?locale=en_US";
    }
    function getQueryString(name){
        var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
        var r = window.location.search.substr(1).match(reg);
        if(r!=null)return  unescape(r[2]); return null;
    }
</script>
<script>

    var zlzs='<@spring.message code="menu.zlzs"/>';
    var zjwd='<@spring.message code="menu.zjwd"/>';
    var nybk='<@spring.message code="menu.nybk"/>';
    var nydsj='<@spring.message code="menu.nydsj"/>';


</script>
</html>